// This mod by cleomodlar
{$CLEO .cs}

//-------------MAIN---------------
thread 'hold'
0AF0: 1@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon1" 
0AF0: 2@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon2" 
0AF0: 3@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon3" 
0AF0: 4@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon4" 
0AF0: 5@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon5" 
0AF0: 6@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon6" 
0AF0: 7@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon7" 
0AF0: 8@ = get_int_from_ini_file "cleo\holdarmed.ini" section "HOLDARMED" key "Weapon8" 

:hold1
wait 0
if 
player.Defined($PLAYER_ACTOR)
jf @hold1                    
wait 0
if or  
02D8:   actor $PLAYER_ACTOR current_weapon == 1@   
02D8:   actor $PLAYER_ACTOR current_weapon == 2@
02D8:   actor $PLAYER_ACTOR current_weapon == 3@
02D8:   actor $PLAYER_ACTOR current_weapon == 4@
02D8:   actor $PLAYER_ACTOR current_weapon == 5@
02D8:   actor $PLAYER_ACTOR current_weapon == 6@
02D8:   actor $PLAYER_ACTOR current_weapon == 7@   
02D8:   actor $PLAYER_ACTOR current_weapon == 8@
jf @hold1
0A8C: write_memory 6330958 size 4 value -1869574000 virtual_protect 1 
0A8C: write_memory 6330962 size 2 value 37008 virtual_protect 1    
Actor.SetWalkStyle($PLAYER_ACTOR, "PLAYER2ARMED")                          
jump @hold2
 
:hold2    
wait 0  
if and 
82D8: not  actor $PLAYER_ACTOR current_weapon == 1@ 
82D8: not  actor $PLAYER_ACTOR current_weapon == 2@
82D8: not  actor $PLAYER_ACTOR current_weapon == 3@
82D8: not  actor $PLAYER_ACTOR current_weapon == 4@ 
82D8: not  actor $PLAYER_ACTOR current_weapon == 5@
82D8: not  actor $PLAYER_ACTOR current_weapon == 6@
82D8: not  actor $PLAYER_ACTOR current_weapon == 7@ 
82D8: not  actor $PLAYER_ACTOR current_weapon == 8@
jf @hold2                    
 0A8C: write_memory 6330958 size 4 value 81036937 virtual_protect 1 
0A8C: write_memory 6330962 size 2 value 0 virtual_protect 1  
jump @hold1   
